%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This function computes off-diagonal blocks of the coefficient matrix,
% but without adding any quadrature corrections. This is intended to be 
% used for blocks for which ind1 and ind2 belong to different contours.
% (It can also be used for well-separated blocks regardless of location.)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function A = get_A_offd_noquad(C,ind1,ind2,kh)

[Y_g1,  X_g1  ] = meshgrid(C(1,ind2), C(1,ind1));
[Y_g2,  X_g2  ] = meshgrid(C(4,ind2), C(4,ind1));
[Y_dg1, X_dg1 ] = meshgrid(C(2,ind2), C(2,ind1));
[Y_dg2, X_dg2 ] = meshgrid(C(5,ind2), C(5,ind1));

ima = sqrt(-1);
nn1 = ( Y_dg2./sqrt(Y_dg1.*Y_dg1 + Y_dg2.*Y_dg2));
nn2 = (-Y_dg1./sqrt(Y_dg1.*Y_dg1 + Y_dg2.*Y_dg2));
dd  = sqrt((Y_g1 - X_g1).^2 + (Y_g2 - X_g2).^2);

K   = funcK(kh,nn1,nn2,(Y_g1 - X_g1),(Y_g2 - X_g2),dd);

A   = K.*sqrt(Y_dg1.^2 + Y_dg2.^2);

return
